﻿//tab 转换
$(document).on('tap click', ".weui-tabbar .weui-tabbar__item", function () {

    $(this).addClass("weui-bar__item_on").siblings().removeClass("weui-bar__item_on");

    //$(".page-hd-title").html($(this).data("name"));

    switch ($(this).data("name")) {
        case 'tip':
            location.href = "/Mobile/Index";
           
            break;
        case 'nine':
            location.href = "/Mobile/Nine";
           
            break;
        case 'subject':
            location.href = "/Mobile/Subject";
            break;
        case 'more':
            location.href = "/Mobile/More";
            break;
        default:
    }
    //$(".weui-news-list").html("");
});

$(function () {
    
    //阻止底部菜单被输入法顶起
    var oHeight = $(document).height(); //浏览器当前的高度
    $(window).resize(function () {

        if ($(document).height() < oHeight) {

            $(".weui-footer_fixed-bottom").css({ "position": "static", "display": "none" });
        } else {
            //下面加的样式根据具体情况添加
            //若 login_footer 里面只有一个div 是不需要加div左右浮动的
            $(".weui-footer_fixed-bottom").css({ "position": "absolute", "display": "block", });
            //$('#login_footer div').css({ "width": "50%", "display": "inline-block", "height": ".9rem" })
            //$('#login_footer div:nth-child(1)').css({ "float": "left" })
            //$('#login_footer div:nth-child(2)').css({ "float": "right" })
        }

    });

});